import request from '@/utils/request'

// 讲师列表（条件分页查询）
// export function getTeacherListPage(current, list, teacherQuery) {
//   return request({
//     url: `/edu/teacher/pageTeacherCondition/${current}/${list}`,
//     method: 'post',
//     // data表示把对象转换成JSON传到接口中
//     data: teacherQuery
//   })
// }


export default {
  getTeacherListPage(current, limit, teacherQuery) {
    return request({
      url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
      // data表示把对象转换成JSON传到接口中
      data: teacherQuery
    })
  },
  deleteTeacher(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete'
    })
  },
  updateTeacher(teacherQuery) {
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: teacherQuery
    })
  },
  getTeacherById(id, teacherQuery) {
    return request({
      url: `/eduservice/teacher/getTeacher/${id}`,
      method: 'get',
      data: teacherQuery
    })
  },
  addTeacher(teacher) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: teacher
    })
  }
}

